package com.systop.mapper;

import com.systop.pojo.Goods_property;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * @Author zhangnan
 * @Data 2020/8/004 下午 3:32
 * @Descriiption
 **/
@Mapper
public interface GoodsPropertyMapper {
    //分页查询

    //查询所有
    @Select("select * from goods_property")
    List<Goods_property> selectGoodsPropertyAll();
    //根据id查询
    @Select("select * from goods_property where goods_property_id=#{goods_property_id}")
    Goods_property selectGoodsPropertByid(Integer goods_property_id);
    //根据名字查询
    @Select("select * from goods_property where goods_property_name=#{goods_property_name}")
    Goods_property selectGoodsPropertByname(String goods_property_name);
    //根据id删除
    @Delete("delete from goods_property where goods_property_id=#{goods_property_id}")
    Integer deleteGoodsPropertByid(Integer goods_property_id);
    //添加商品属性
    @Insert("insert into goods_property(goods_property_name) values(#{goods_property_name})")
    Integer insertGoodsPropert(Goods_property goods_property);
    //根据id更新商品属性
    @Update("update goods_property set goods_property_name=#{goods_property_name} where goods_property_id=#{goods_property_id}")
    Integer updateGoodsPropertByid(Goods_property goods_property);
    //批量删除
}
